using FileStorageCenter.Common;
using FileStorageCenter.Services.Models;
using FileStorageCenter.Services.Services;

namespace FileStorageCenter.Controllers;

[ApiController]
public class UserController : ControllerBase
{
    private readonly IUserService _service;

    public UserController(IUserService service)
    {
        _service = service;
    }

    // GET api/user
    [HttpGet("api/user")]
    public Task<ListResult<User.QueryModel>> GetListAsync()
    {
        return _service.GetListAsync(HttpContext.RequestAborted);
    }
}